package com.example.gbuffer.Component.Framebuffer;
import android.opengl.GLES32;
import android.util.Log;

import java.nio.IntBuffer;

public class SurfaceFramebuffer extends Framebuffer{

    @Override
    public void bind() {

        GLES32.glBindFramebuffer(GLES32.GL_FRAMEBUFFER, 0);

        // - 告诉OpenGL我们将要使用(帧缓冲的)哪种颜色附件来进行渲染
        IntBuffer attachments = IntBuffer.wrap(new int[]{
                GLES32.GL_COLOR_ATTACHMENT0,
        });
        attachments.position(0);
        GLES32.glDrawBuffers(1, attachments);
    }
}
